<template>
	<view class="content">
		<view class="status">
			<block v-if="status == 0">
				<view class="img">
					<image src="../../static/pay_success.png" mode="aspectFit"></image>
				</view>
				<view class="cont">
					支付成功
				</view>
				<view class="btn">
					<button type="primary" @click="$framDate.navBack()">返回</button>
				</view>
			</block>
			<block v-else>
				<view class="img">
					<image src="../../static/pay_fail.png" mode="aspectFit"></image>
				</view>
				<view class="cont">
					支付失败
				</view>
				<view class="btn">
					<button type="warn" @click="$framDate.navBack()">返回</button>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				status: 0
			}
		},
		onLoad(option) {
			console.log(option)
			this.status = option.status
		}
	}
</script>

<style lang="scss">
	.content{
		width: 90%;
		padding: 50rpx 5%;
	}
	.status{
		width: 100%;
		.img{
			width: 100%;
			margin-top: 150rpx;
			text-align: center;
			image{
				width: 347rpx;
				height: 347rpx;
			}
		}
		.cont{
			width: 100%;
			height: 234rpx;
			line-height: 234rpx;
			font-size: 36rpx;
			color: #344968;
			font-weight: bold;
			text-align: center;
		}
		button[type="primary"]{
			width: 90%;
			height: 93rpx;
			line-height: 93rpx;
			font-size: 33rpx;
			background-color: #37C98F;
		}
		button[type="warn"]{
			width: 90%;
			height: 93rpx;
			line-height: 93rpx;
			font-size: 33rpx;
			background-color: #F65534;
		}
	}
</style>
